import Vue from 'vue'
import gzhbPage from './ui/page.vue'
import gzhbItem from './ui/item.vue'
import GzhbCheckbox from './ui/checkbox.vue'
import gzhbField from './ui/field.vue'
import gzhbDialog from './ui/dialog.vue'
import gzhbIcon from './ui/icon.vue'
import gzhbRadio from './ui/radio.vue'
import gzhbLoading from './ui/loading.vue'

let components = [
  gzhbPage,
  gzhbItem,
  GzhbCheckbox,
  gzhbField,
  gzhbDialog,
  gzhbIcon,
  gzhbRadio,
  gzhbLoading
]

const install = function (Vue) {
  components.forEach(component => {
    Vue.component(component.name, component)
  })
}

if (typeof window !== 'undefined' && window.Vue) install(window.Vue)
export default {
  install
}